package com.zimmur.dao.order;

import java.util.List;

import com.zimmur.model.order.Cart;
import com.zimmur.model.order.view.CartView;

public interface ICartDao {

    int deleteByPrimaryKey(long cartId);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(long cartId);
	
    int updateByPrimaryKeySelective(long cartId);
    
    List<CartView> selectUserCartByView(long userId);
    
    Cart selectByUserIdAndColorAndSize(Cart cart);
    
    int updateQuantity(Cart cart);
    
    //按设计师查询当前购物车商品数
    int selectByDesigerId(long desigerId);
    
    //获取用户当前购物车物品数
    int selectCountByUserId(long userId);

	/**
	* <p>Title: deleteByGoodsId</p>
	* <p>Description: 根据商品id和购物车id删除购物车商品</p>
	* @param cart
	*/
	int deleteByGoodsId(Cart cart);

	/**
	* <p>Title: selectCartByUserId</p>
	* <p>Description:根据用户id查询购物车 </p>
	* @param userId
	* @return
	*/
	List<Cart> selectCartByUserId(long userId);
}